import time,os

from selenium.webdriver.common.by import By
from Base.Base import Base

class Page(Base):
    fream = (By.XPATH,os.getenv('frame'))
    username = (By.NAME,'email')
    password = (By.NAME,'password')
    login = (By.ID,'dologin')
    def username_01(self):
        self.send_keys(self.username,'15232008902')

    def password_02(self):
        self.send_keys(self.password,'ma820116.')

    def login_03(self):
        self.click(self.login)

    def frame_04(self):
        self.frame(self.fream)

    def mail_louji(self):
        self.open_url('https://mail.163.com/')
        self.frame_04()
        print('进入frame成功')
        self.username_01()
        self.password_02()
        self.login_03()